package com.qire.manhua.model.enumeration;

import com.qire.manhua.R;

/**
 * 账号管理业务相关面板布局枚举：如登录流程、修改密码、更换手机、绑定账户、注销账户
 */
public enum AccountBusinessPanelLayout {
    LoginWay("手机登录/注册", R.id.layout_loginWay),
    PhoneRegister("设置密码", R.id.layout_phoneRegister, false),//手机注册
    NicknameSet("设置昵称", R.id.layout_nicknameSet, true, true),
    PhoneLogin("登录", R.id.layout_phoneLogin), //"手机登录"
    RetrievePassword("找回密码", R.id.layout_retrievePassword, false),
    SetPassword("设置密码", R.id.layout_setPassword, false),
    CodeVerify("请输入验证码", R.id.layout_verifyCode, false),

    ModifyPasswordWay("修改密码", R.id.layout_modifyPasswordWay),
    SendVerifyCode("修改密码", R.id.layout_sendVerifyCode),
    ModifyPassword("修改密码", R.id.layout_modifyPassword, false),
    ModifyPwdFinishHint("修改密码", R.id.layout_finish, false, true),

    ChangePhoneWay("手机号绑定", R.id.layout_changePhoneWay),
    PhoneVerifyWay("更换手机号", R.id.layout_phoneVerifyWay),
    NewPhoneVerify("验证新手机号", R.id.layout_newPhoneVerify),//绑定新手机号
    OldPhoneVerify("验证原手机号", R.id.layout_oldPhoneVerify),//更换手机号
    ChangePhoneByAppeal("更换手机号", R.id.layout_appealInfo),//通过申诉更换电话号码绑定
    Waiting("更换手机号", R.id.layout_waiting, false, true),
    BindGuideFinishHint("绑定手机号", R.id.layout_finish, false, true),

    AccountCancellationPhoneVerifyWay("注销账号", R.id.layout_phoneVerifyWay),
    AccountCancellationByAppeal("注销账号", R.id.layout_appealInfo),//通过申诉注销账号
    AccountCancellationArtificialAppealsPass("注销账号", R.id.layout_artificialAppealsPass),//人工审核通过
    AccountCancellationWaiting("注销账号", R.id.layout_waiting, false, true),
    AccountCancellationNotice("注销账号", R.id.layout_accountCancellationNotice, false),
    AccountCancellationGuideFinishHint("注销账号", R.id.layout_finish, false, true);


    public final String pageTitle;
    public final int pageLayoutRid;
    public final int closeBtnRid;
    public final boolean isFinish;

    private boolean needRecycle;
    private AccountBusinessPanelLayout nextPanelLayout;

    AccountBusinessPanelLayout(String pageTitle, int pageLayoutRid) {
        this(pageTitle, pageLayoutRid, true, false);
    }
    AccountBusinessPanelLayout(String pageTitle, int pageLayoutRid, boolean needRecycle) {
        this(pageTitle, pageLayoutRid, needRecycle, false);
    }
    AccountBusinessPanelLayout(String pageTitle, int pageLayoutRid, boolean needRecycle, boolean isFinish) {
        this.pageTitle      = pageTitle;
        this.pageLayoutRid  = pageLayoutRid;
        this.closeBtnRid    = R.drawable.app_navbar_icon_back_grey;
        this.needRecycle    = needRecycle;
        this.isFinish       = isFinish;
    }

    public AccountBusinessPanelLayout addNext(AccountBusinessPanelLayout nextPanelLayout) {
        this.nextPanelLayout = nextPanelLayout;
        return this;
    }
    public AccountBusinessPanelLayout next() {
        return nextPanelLayout;
    }
    public void setNeedRecycle(boolean needRecycle) {
        this.needRecycle = needRecycle;
    }
    public boolean needRecycle() {
        return needRecycle;
    }
}
